﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ASmile.Com
{
    public enum EmDictType : short
    {
        /// <summary>
        /// 性别
        /// </summary>
        Sex = 101,
        /// <summary>
        /// 职务
        /// </summary>
        Post = 102,
        /// <summary>
        /// 职务级别
        /// </summary>
        Levl = 103,
        /// <summary>
        /// 学历
        /// </summary>
        Education = 104,
        /// <summary>
        /// 员工类型
        /// </summary>
        EmpType = 105,
        /// <summary>
        /// 科室类型
        /// </summary>
        DeptType = 106,
        /// <summary>
        /// 民族
        /// </summary>
        Nation = 107,
        /// <summary>
        /// 医生职称
        /// </summary>
        DoctorPost = 108,
        /// <summary>
        /// 证件类型
        /// </summary>
        IDType = 111,
        /// <summary>
        /// 支付类型
        /// </summary>
        PayType = 112,
        /// <summary>
        /// 婚姻状况
        /// </summary>
        MaritalStatus = 122,
        /// <summary>
        /// 国家
        /// </summary>
        Country = 123,
        /// <summary>
        /// 标本（标本类型）
        /// </summary>
        Specimen = 128,
        /// <summary>
        /// 标本类型（标本特性）
        /// </summary>
        SpecimenType = 129,
        /// <summary>
        /// 试管
        /// </summary>
        TestTube = 130,

        /// <summary>
        /// 体检 - 条码组
        /// </summary>
        Pe_BarcodeGroup = 201,
        /// <summary>
        /// 体检 - 采集方式
        /// </summary>
        Pe_CollectMode = 202,
        /// <summary>
        /// 体检 - 收费方式
        /// </summary>
        Pe_ChargeMode = 203,
        /// <summary>
        /// 体检 - 体检类别
        /// </summary>
        Pe_Category = 204,
        /// <summary>
        /// 体检 - 仪器分组（基础项目）
        /// </summary>
        Pe_DevGroup = 205,
        /// <summary>
        /// 项目单位（基础项目）
        /// </summary>
        Pe_ItemUnit = 206,
        /// <summary>
        /// 体检项目结果标记
        /// </summary>
        Pe_ItemResultFlag = 207,
        ///// <summary>
        ///// 体检指引单分组
        ///// </summary>
        //PE_GuideGroup = 208,
    }

    /* 不用了
    public class DictType
    {
        static DictType()
        {
            InitDictType();
        }

        public DictType()
        { }

        private DictType(short typeNo, string typeName)
        {
            TypeNo = typeNo;
            TypeName = typeName;
        }

        public short TypeNo { get; set; }

        public string TypeName { get; set; }
        /// <summary>
        /// 返回字典类型列表
        /// </summary>
        static List<DictType> DictTypes { get; } = new List<DictType>();

        public static string GetTypeName(DictTypeEnum type)
        {
            var r = DictTypes.Find(s => s.TypeNo == (short)type);
            return r?.TypeName;
        }

        public static string GetTypeName(short typeNo)
        {
            var r = DictTypes.Find(s => s.TypeNo == typeNo);
            return r?.TypeName;
        }

        /// <summary>
        /// 获取类型列表
        /// </summary>
        /// <param name="sysType">系统类型，1：his,2:体检 </param>
        public static List<DictType> GetPeType(int sysType)
        {
            return DictTypes;
        }

        static void InitDictType()
        {
            DictTypes.Add(new DictType((short)DictTypeEnum.Sex, "性别"));
            DictTypes.Add(new DictType((short)DictTypeEnum.Post, "职务"));
            DictTypes.Add(new DictType((short)DictTypeEnum.Levl, "职级"));
            DictTypes.Add(new DictType((short)DictTypeEnum.EmpType, "员工类型"));
            DictTypes.Add(new DictType((short)DictTypeEnum.Education, "学历"));
            
            DictTypes.Add(new DictType((short)DictTypeEnum.DeptType, "科室类型"));
            DictTypes.Add(new DictType((short)DictTypeEnum.Nation, "民族"));
            DictTypes.Add(new DictType((short)DictTypeEnum.DoctorPost, "医生职称"));
            DictTypes.Add(new DictType((short)DictTypeEnum.IDType, "证件类型"));
            DictTypes.Add(new DictType((short)DictTypeEnum.PayType, "支付类型"));
            DictTypes.Add(new DictType((short)DictTypeEnum.MaritalStatus, "婚姻状况"));
            DictTypes.Add(new DictType((short)DictTypeEnum.Country, "国家"));
            DictTypes.Add(new DictType((short)DictTypeEnum.Specimen, "标本(类型)"));
            //DictTypes.Add(new DictType((int)DictTypeEnum.SpecimenType, "标本特性"));
            DictTypes.Add(new DictType((short)DictTypeEnum.TestTube, "试管"));

            DictTypes.Add(new DictType((short)DictTypeEnum.Pe_BarcodeGroup, "条码组"));
            DictTypes.Add(new DictType((short)DictTypeEnum.Pe_CollectMode, "采集方式"));
            DictTypes.Add(new DictType((short)DictTypeEnum.Pe_ChargeMode, "体检收费方式"));
            DictTypes.Add(new DictType((short)DictTypeEnum.Pe_Category, "体检类别"));
            DictTypes.Add(new DictType((short)DictTypeEnum.Pe_DevGroup, "仪器分组"));
        }
    }
    */

    /* 不用了
    /// <summary>
    /// 字典类型
    /// 不推荐使用，请使用: DictType
    /// </summary>
    public class EmDictType
    {
        /// <summary>
        /// 性别
        /// </summary>
        public const short Sex = 101;
        /// <summary>
        /// 职务
        /// </summary>
        public const short Post = 102;
        /// <summary>
        /// 职务级别
        /// </summary>
        public const short Levl = 103;
        /// <summary>
        /// 学历
        /// </summary>
        public const short Education = 104;
        /// <summary>
        /// 员工类型
        /// </summary>
        public const short EmpType = 105;
        /// <summary>
        /// 科室类型
        /// </summary>
        public const short DeptType = 106;
        /// <summary>
        /// 民族
        /// </summary>
        public const short Nation = 107;
        /// <summary>
        /// 医生职称
        /// </summary>
        public const short DoctorPost = 108;
        /// <summary>
        /// 证件类型
        /// </summary>
        public const short IDType = 111;
        /// <summary>
        /// 支付类型
        /// </summary>
        public const short PayType = 112;
        /// <summary>
        /// 婚姻状况
        /// </summary>
        public const short MaritalStatus = 122;
        /// <summary>
        /// 国家
        /// </summary>
        public const short Country = 123;
        /// <summary>
        /// 标本（标本类型）
        /// </summary>
        public const short Specimen = 128;
        /// <summary>
        /// 标本类型（标本特性）
        /// </summary>
        public const short SpecimenType = 129;
        /// <summary>
        /// 试管
        /// </summary>
        public const short TestTube = 130;
        /// <summary>
        /// 检验项目-打印类别
        /// </summary>
        public const short TestPrintType = 131;
        /// <summary>
        /// 检验类别
        /// </summary>
        public const short TestCategory = 132;
        /// <summary>
        /// 检查类别
        /// </summary>
        public const short CheckCategory = 133;
        /// <summary>
        /// 检查部位
        /// </summary>
        public const short CheckPosition = 134;
        ///// <summary>
        ///// 检查方法(保留不用)
        ///// </summary>
        //public const short CheckMethod = 135;
        /// <summary>
        /// 治疗类别
        /// </summary>
        public const short CureCategory = 136;
        /// <summary>
        /// 分检样式
        /// </summary>
        public const short Pe_Stype = 201;
    }
    */
}